/**
 * 获取元素距离文档的高度，
 * @param e
 */
export function getTop(e: HTMLElement) {
  let offset = e.offsetTop
  if (e.offsetParent != null) offset += getTop(e.offsetParent as HTMLElement)
  return offset
}
